package com.shop.milk_tea_shop.controller;

import com.shop.milk_tea_shop.common.BaseContext;
import com.shop.milk_tea_shop.common.CodeEnum;
import com.shop.milk_tea_shop.common.GlobalInfo;
import com.shop.milk_tea_shop.common.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 俞静雯
 * @Description
 * @date 2024-06-26  21:23
 */
@RestController
@RequestMapping("/login")
@Slf4j
public class LoginController {

    @GetMapping("/{id}")
    public Result<Boolean> login(@PathVariable Long id) {
        log.info("线程id为：{}",Thread.currentThread().getId());
        System.out.println(id);
        return new Result<>(CodeEnum.SUCCESS.getMsg(), CodeEnum.SUCCESS, true, new GlobalInfo());
    }
}
